//
//  PiShangCollectionCell.m
//  KCFurProject
//
//  Created by ios程序员 on 15/11/3.
//  Copyright (c) 2015年 ios程序员. All rights reserved.
//

#import "PiShangCollectionCell.h"

@implementation PiShangCollectionCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageView];
        [self.imageView setImage:[UIImage imageNamed:@"dd"]];
        self.jianjieLabel = [[UILabel alloc ]init];
        [self.contentView addSubview:self.jianjieLabel];
        self.jianjieLabel.text = @"等发达的额大风噶个";
        self.jianjieLabel.font = [UIFont systemFontOfSize:11];
        
        self.addLabel = [[UILabel alloc] init];
        self.addLabel.text = @"哈尔滨";
        self.addLabel.font = [UIFont systemFontOfSize:11];
        [self.contentView addSubview:self.addLabel];
        
        self.baoyouLabel = [[UILabel alloc ] init];
        [self.contentView addSubview:self.baoyouLabel];
        self.baoyouLabel.text = @"包邮";
        self.baoyouLabel.font = [UIFont systemFontOfSize:11];
        
        self.moneyLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.moneyLabel ];
        self.moneyLabel.text = @"100.00";
        self.moneyLabel.textColor = [UIColor redColor];
        self.moneyLabel.font = [UIFont systemFontOfSize:11];
        self.yishouLabel.text = @"已售:5";
        self.yishouLabel.font = [UIFont systemFontOfSize:10];
        self.yishouLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.yishouLabel];
    }
    return self;
}

- (void)layoutSubviews
{
    CGFloat wid = self.frame.size.width;
    CGFloat hei = self.frame.size.height;
    self.imageView.frame = CGRectMake(0, 0, wid , hei - 60);
    self.jianjieLabel.frame = CGRectMake(10, hei - 62 , wid, 20);
    self.addLabel.frame = CGRectMake(10, hei - 42, 40, 20);
    self.baoyouLabel.frame = CGRectMake(wid - 40, hei - 42,30, 20);
    self.moneyLabel.frame = CGRectMake(10, wid - 20, wid - 100, 20);
    self.yishouLabel.frame = CGRectMake(wid - 50, wid - 20, 40, 20);
    
    
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
